package Thread_;

class MyThread10 extends Thread{
    @Override
    public void run() {
        while(true){
            System.out.println("Thread run");
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }
}
public class Thread10 {
    public static void main(String[] args) throws InterruptedException {
        MyThread10 t1 = new MyThread10();
        MyThread10 t2 = new MyThread10();
//        t1.start();
//        t2.start();
        t1.run();
        while(true){
            System.out.println("main");
            Thread.sleep(1000);

        }

    }

}
